﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BG_Friendlink.aspx.cs" Inherits="BG_Manage_BG_Friendlink" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="BG_CSS/Main.css" rel="stylesheet" type="text/css" />
    <title>友情链接</title>
</head>

<body>
    <form id="form1" runat="server">
        <div>
            <!-- 顶部栏-->
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="17" valign="top" background="BG_IMG/Main/mail_leftbg.gif">
                        <img src="BG_IMG/Main/left-top-right.gif" width="17" height="29" /></td>
                    <td valign="top" background="BG_IMG/Main/content-bg.gif">
                        <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
                            <tr>
                                <td height="31">
                                    <div class="titlebt">友情链接</div>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="16" valign="top" background="BG_IMG/Main/mail_rightbg.gif">
                        <img src="BG_IMG/Main/nav-right-bg.gif" width="16" height="29" /></td>
                </tr>
                <!-- 中部栏-->
                <tr>
                    <td valign="middle" background="BG_IMG/Main/mail_leftbg.gif" style="height: 19px">
                    </td>
                    <td valign="top" bgcolor="#F7F8F9" style="height: 19px;">
                        <div align="center">
                            <asp:Label ID="smslabel" runat="server" Width="100%" Font-Size="Large" ForeColor="Red"></asp:Label>
                        </div>
                       
                        <!--*********************************************************************************************-->
                        <div align="center" class="plGV">
                            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                CellPadding="4" DataKeyNames="LinkID" ForeColor="#333333" GridLines="None" Width="80%"
                                OnPageIndexChanging="GridView1_PageIndexChanging" OnRowCommand="GridView1_RowCommand">
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <Columns>
                                    <asp:BoundField DataField="LinkID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="LinkID" />
                                    <asp:BoundField DataField="LinkName" HeaderText="友情链接" SortExpression="LinkName" />
                                    <asp:BoundField DataField="LinkURL" HeaderText="友情链接地址" SortExpression="LinkURL" />
                                    <asp:TemplateField HeaderText="编辑/删除">
                                        <ItemTemplate>
                                            <asp:Button ID="btnEdit" runat="server" Text="编 辑" CausesValidation="False" CommandName="EditAdmin"
                                                CommandArgument='<%#Eval("LinkID") %>' />
                                            <asp:Button ID="btnDel" runat="server" Text="删 除" CausesValidation="False" CommandName="DeleteAdmin"
                                                OnClientClick='return confirm("您真的要删除这条记录吗？")' CommandArgument='<%#Eval("LinkID") %>' />
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                </Columns>
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <EditRowStyle BackColor="#999999" />
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                            </asp:GridView>
                        </div>
                        <br />
                        <br />
                        <!--*********************************************************************************************-->
                        <!--友情链接添加/修改板块 -->       <!--友情链接添加/修改板块 -->      <!--友情链接添加/修改板块 -->
                        <!--*********************************************************************************************-->
                        <div align="center" class="plEd">
                            <table width="80%">
                                <tr>
                                    <td style="background-color: #5d7b9d; height: 30px; color: white;" colspan="3">
                                        <asp:Label ID="lab" runat="server" Text="添加友情链接" Font-Size="X-Large"></asp:Label></td>
                                </tr>
                                <tr>
                                    <td style="width: 150px; height: 26px;"> 友 情 链 接：</td>
                                    <td style="width: 100px; height: 26px;">
                                        <input id="txtName" type="text" maxlength="100" name="txtName" runat="server" style="width: 300px"></td>
                                    <td style="width: 200px; height: 26px;">
                                        <asp:RequiredFieldValidator ID="Requiredfieldvalidator1" runat="server" NAME="Requiredfieldvalidator2"
                                            Display="Dynamic" ErrorMessage="*请填写链接名称" ControlToValidate="txtName"></asp:RequiredFieldValidator></td>
                                </tr>
                                <tr>
                                    <td style="width: 150px">友情链接地址：</td>
                                    <td style="width: 100px">
                                        <input id="txtUrl" type="text" maxlength="100" size="80" name="txtUrl" runat="server" style="width: 300px"></td>
                                    <td style="width: 200px">
                                        <asp:RequiredFieldValidator ID="Requiredfieldvalidator2" runat="server" NAME="Requiredfieldvalidator2"
                                            Display="Dynamic" ErrorMessage="*请输入链接地址" ControlToValidate="txtUrl"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtUrl"
                                            ErrorMessage="请输入合法的网站链接" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?"></asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="3">
                                        <asp:Button ID="btnSave" runat="server" Text="· 保存 ·" OnClick="btnSave_Click" /></td>
                                </tr>
                                <tr>
                                    <td colspan="3">
                                        <asp:HiddenField ID="hdID" runat="server" Value="0" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <!--*********************************************************************************************-->

                    </td>
                    <td background="BG_IMG/Main/mail_rightbg.gif" style="height: 19px">
                    </td>
                </tr>
                <!-- 底部栏-->
                <tr>
                    <td valign="bottom" background="BG_IMG/Main/mail_leftbg.gif">
                        <img src="BG_IMG/Main/buttom_left2.gif" width="17" height="17" /></td>
                    <td background="BG_IMG/Main/buttom_bgs.gif" style="width: 917px">
                        <img src="BG_IMG/Main/buttom_bgs.gif" width="17" height="17" /></td>
                    <td valign="bottom" background="BG_IMG/Main/mail_rightbg.gif">
                        <img src="BG_IMG/Main/buttom_right2.gif" width="16" height="17" /></td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
